#ifdef CH_LANG_CC
/*
 *      _______              __
 *     / ___/ /  ___  __ _  / /  ___
 *    / /__/ _ \/ _ \/  V \/ _ \/ _ \
 *    \___/_//_/\___/_/_/_/_.__/\___/
 *    Please refer to Copyright.txt, in Chombo's root directory.
 */
#endif

#ifndef _DEBUGOUT_H_
#define _DEBUGOUT_H_

#include "DisjointBoxLayout.H"
#include "BoxLayout.H"
#include "Vector.H"
#include "Box.H"
#include "IVSFAB.H"
#include "IntVectSet.H"
#include "FArrayBox.H"
#include "NodeFArrayBox.H"
#include "LevelData.H"
#include "LayoutIterator.H"
#include "BoxIterator.H"
#include "NamespaceHeader.H"  // Don't need this now (everything is extern "C")
                              // but maybe will need it in the future.
#ifdef CH_MULTIDIM
#include "BoxTools_ExternC_Mangler.H" // Generated by lib/utils/multidim/mangle_externs.sh
#endif

  ///
  /**
     Dump boxlayout of inputs to standard out.  For use inside debuggers.
     dumps points on this proc
   */
  void dumpLDFLoc(const LevelData<FArrayBox>* a_ldfabPtr);

  void dumpMaxMin(const LevelData<FArrayBox>* a_ldfabPtr);

  /// does a copy first
  void dumpLDFPar(const LevelData<FArrayBox>* a_ldfabPtr);

  /// does a copy first
  void dumpNodeLDFPar(const LevelData<NodeFArrayBox>* a_ldfabPtr);

  /// dumps points on this proc
  void dumpNodeLDFLoc(const LevelData<NodeFArrayBox>* a_ldfabPtr);

  ///
  void dumpNodeFAB(const NodeFArrayBox* a_fabPtr);

  ///
  void dumpFAB(const FArrayBox* a_fabPtr);

  ///
  void dumpBFR(const BaseFab<Real>* a_fabPtr);

  ///
  void dumpBFI(const BaseFab<int>* a_fabPtr);

  ///
  /**
     Dump a 2D slice and print it as an ordered rectangle (very pretty for small
     boxes)
     \param[in]  a_fabPtr
                        Data to dump
     \param[in]  a_comp Component
     \param[in]  a_ivSml
                        Lower bound of box to print (default IntVect::Zero)
     \param[in]  a_ivBig
                        Upper bound of box to print (default IntVect::Zero)
     \param[in]  a_prec Number of digits after decimal (default 2)
     \note
     <ul>
       <li> If a_ivSml == IntVect::Zero && a_ivBig == IntVect::Zero then the
            full extent of a_fabPtr.box() is printed.  But this only works in
            2D because...
       <li> a_ivSml and a_ivBig must have only 2 directions that differ in value
            so the slice is properly defined
     </ul>
  */
  void dumpFAB2DSlicePretty(const FArrayBox *const a_fabPtr,
                            const int              a_comp = 0,
                            IntVect                a_ivSml = IntVect::Zero,
                            IntVect                a_ivBig = IntVect::Zero,
                            const int              a_prec = 2,
                            std::ostream&          a_out = pout());

  ///
  /**
     Dump boxlayout of inputs to standard out.  For use inside debuggers.
   */
  void dumpIVSFAB(const IVSFAB<Real>* a_ivsfabPtr);

  ///
  /**
     Dump inputs to standard out.  For use inside debuggers.
   */
  void dumpDBL(const DisjointBoxLayout* a_dblInPtr);

  ///
  /**
     Dump inputs to standard out.  For use inside debuggers.
   */
  void dumpBL(const BoxLayout* a_dblInPtr);

  ///
  /**
     Dump inputs to standard out.  For use inside debuggers.
   */
  void dumpIVS(const IntVectSet* a_ivsPtr);

  ///
  /**
     Dump inputs to standard out.  For use inside debuggers.
   */
  void dumpBox(const Box* a_boxPtr);

  ///
  /**
     Dump inputs to standard out.  For use inside debuggers.
   */
  void dumpVBox(const Vector<Box>* a_vectPtr);

  ///
  /**
     Dump inputs to standard out.  For use inside debuggers.
   */
  void dumpVVBox(const Vector<Vector<Box> >* a_vectPtr);

  ///
  /**
     Dump inputs to standard out.  For use inside debuggers.
   */
  void dumpLDDBL(const LevelData<FArrayBox>* a_ldfabPtr);

  ///
  /**
     Dump inputs to standard out.  For use inside debuggers.
   */
  void dumpNodeLDDBL(const LevelData<NodeFArrayBox>* a_ldfabPtr);

#include "NamespaceFooter.H"

#endif
